package Demo01;

public class Thread03 implements Runnable {

    @Override
    public void run(){
        for (int i = 0; i < 20; i++) {
            System.out.println("index "+ i +" "+"我在看代码===");
        }
    }

    public static void main(String[] args) throws InterruptedException {
        // Thread01 线程
        Thread03 test1 = new Thread03();

        /*
        Thread thread = new Thread(test1);
        thread.start();
        */
        new Thread(test1).start();

        // 主线程
        for (int i = 0; i < 20; i++) {
            System.out.println("index "+ i +" "+"我在学多线程+++");
        }
    }
}
